<template>
  <el-row>
    <el-col :span="colSpan || 20">
      <template v-if="typeof title == 'string'">
        {{ title }}
      </template>
      <component v-else :is="title"/>
    </el-col>
    <el-col :span="colSpan ? 24 - colSpan : ''">
      <template v-if="typeof subTitle == 'string'">
        {{ subTitle }}
      </template>
      <component v-else :is="subTitle"/>
    </el-col>
  </el-row>
</template>


<script setup>
defineProps({
  title: {
    default: ''
  },
  subTitle: {
    default: ''
  },
  colSpan: {
    type: Number,
    default: 20
  }
})
</script>